import Vue from 'vue'
import Router from 'vue-router'
import login from '@/pages/login'//登录页面
import regist from '@/pages/regist'//注册页面
import forgetpws from '@/pages/forgetpws'//忘记密码页面
import index from '@/pages/index'//展示首页
import drugs from '@/pages/drugs'//药品页面
import statistics from '@/pages/statistics'//统计页面
import set from '@/pages/set'//设置页面
import jiezhen from '@/pages/jiezhen'//设置页面

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      redirect: '/index/jiezhen',//转链接
      children:[
        {
          path: 'drugs',//走进青果
          name: 'drugs',
          component: drugs
        },
        {
          path: 'statistics',//产品
          name: 'statistics',
          component: statistics
        },
        {
          path: 'set',//联系我们
          name: 'set',
          component: set
        },
        {
          path: 'jiezhen',//联系我们
          name: 'jiezhen',
          component: jiezhen
        }
      ]
    },{
      path: '/regist',//注册页面
      name: 'regist',
      component: regist
    },{
      path: '/forgetpws',//忘记密码
      name: 'forgetpws',
      component: forgetpws
    }

    
  ]
})
